package it.polimi.reTraveldream.entities;


import it.polimi.reTravelDream.dto.ExcursionDTO;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * Entity implementation class for Entity: EXCURSIONS
 *
 */
@Entity
@Table(name="excursion")
@NamedQueries({
	@NamedQuery(name=Excursion.FIND_ALL,
            query="SELECT e FROM Excursion e")	
})


public class Excursion implements Serializable {

	private static final long serialVersionUID = 1L;   
	public static final String FIND_ALL="Excursion.findAll"; 
	
	@Id
	
	private int id;
	private String name;
	private String description;
	private int price;
	private boolean isActive;
	

	public Excursion() {
	}   
	
	public Excursion(ExcursionDTO excursionDTO){
		super();
		this.id=excursionDTO.getId();
		this.name=excursionDTO.getName();
		this.description=excursionDTO.getDescription();
		this.price=excursionDTO.getPrice();
		this.isActive=excursionDTO.isActive();
	}
	
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public int getPrice() {
		return price;
	}
	public void setPrice(int price) {
		this.price = price;
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}
   
}
